package com.zj.log.util;


import com.zj.log.vo.ResultVo;

/**
 * @Auther: zj
 * @Date: 2018/11/14 10:51
 * @Description:
 */
public class ResultVoUtil {

    public static ResultVo<Object> success(Object object) {
        ResultVo<Object> resultVo=new ResultVo<>();
        resultVo.setCode( 1 );
        resultVo.setMsg( "成功" );
        resultVo.setData( object );
        return resultVo;
    }
    public static ResultVo<Object> success(Object object,Integer pageTotal) {
        ResultVo<Object> resultVo=new ResultVo<>();
        resultVo.setCode( pageTotal);
        resultVo.setMsg( "成功" );
        resultVo.setData( object );
        return resultVo;
    }

    public static ResultVo<Object> success() {
        ResultVo<Object> resultVo=new ResultVo<>();
        resultVo.setCode( 1 );
        resultVo.setMsg( "成功" );
        return resultVo;
    }

    public static ResultVo<Object> error(String str) {
        ResultVo<Object> resultVo=new ResultVo<>();
        resultVo.setCode( 0);
        resultVo.setMsg( str);
        return resultVo;
    }
    public static ResultVo<Object> error() {
        ResultVo<Object> resultVo=new ResultVo<>();
        resultVo.setCode( 0);
        resultVo.setMsg( "没有准入权限");
        return resultVo;
    }


}
